<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
<script type="text/javascript" src="./jquery-1.7.1.min.js"></script>
<script type="text/javascript">

function removeTag(obj){
	document.mainForm.rslt.value = strip_tags(obj.value,'<hello>');
};

function strip_tags (input, allowed) {
    allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
    var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi, commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
    return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';});
};

function removeSpChar(obj){
	if(event.shiftKey && event.keyCode == 53){
		obj.value= obj.value.replace(/%/g,"");
		return;
	}else{
		event.returnValue = true;
		return;
	}
};

function removeSpChar2(obj){
	obj.value= obj.value.replace(/%/g,"");
	return;
}
</script>
</head>
</head>
<body>
<form name="mainForm">
<input type="text" name="ipt"/><input type="button" value="ġȯ" onclick="removeTag(document.mainForm.ipt);"/>
<input type="text" name="rslt"/>
<br/><br/>
<input type="text" name="pm" onkeyup="removePcent(this);" onblur="removePcent(this);"/>
</form>
</body>
</html>